package com.sh.common.enums;

/**
 * @author luotao
 */

public enum AlgoOutputTypeEnum {

    RESULT("result", "算子返回值"),
    FUNC("func", "捕获变量");


    private String code;
    private String message;

    AlgoOutputTypeEnum(String code, String message){
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }

    public static String getMessageByCode(String code) {
        for (AlgoOutputTypeEnum usedEnum : AlgoOutputTypeEnum.values()) {
            if (usedEnum.code.equals(code)) {
                return usedEnum.getMessage();
            }
        }
        return null;
    }

}
